﻿using System;
using RayDen.Library.Components.Surface;
using RayDen.Library.Data;

namespace RayDen.MaterialManager
{
    [Serializable]
    public class MaterialVault : StorageVault<string, SurfaceMaterial> {
        protected override string GetKey(SurfaceMaterial val)
        {
            return val.Name;
        }
        public override void LoadXml(string fileName, Type[] knownTypesArg)
        {
            base.LoadXml(fileName, knownTypesArg);
            foreach (var item in elements)
            {
                item.Value.Name = item.Key;
            }
        }
    }
}